package demo1;

import java.util.Arrays;

public class Test2 {
    public static void main(String[] args) {
        int[] array1 = {1, 2, 3, 4} ;
        int[] array2 ;
        array2 = Arrays.copyOf(array1 , 3) ;
        System.out.println(Arrays.toString(array2));

    }
}
